
function process(cmd,obj)
{
	
	if(cmd=="showTips")
		log.info("收到提示消息:"+obj.arg);
		
	if(cmd=="createHero") //
	{
		var js="{\"cmd\":\"CreateHero\",\"unitID\":\"zhangliao\",\"heroName\":\"少年张辽\"}";
		sendMsg(js);
	}else if(cmd=="loadMap")
	{
		log.info("加载地图:"+obj.mapURl);
		var runto= "{\"cmd\":\"Run\",\"arg\":\"5,7\"}";
		sendMsg(runto);
	}else if(cmd=="runTo")
	{
		var runto= "{\"cmd\":\"Run\",\"arg\":\"3,8\"}";
		sendMsg(runto);
		log.info("发送:"+runto);
	}
}


function sendMsg(json)
{
	req.sendMsg(json.toString());
}